A digital data processing system basically comprises three components, a central processing unit, a memory, and an input-output unit. The central processing unit manipulates data supplied thereto in accordance with a set of instructions contained in a program, often called an application process. The memory is used to store the data, the program instructions, intermediate data and system status information required to operate the system, and the final output resulting from the manipulation of the data. Each element of information, the instructions, the data and status information is stored in a specific designated address of the memory. The input-output unit provides a means for entering the data and program instructions into the system and for receiving output status messages and the final output of data manipulations therefrom. When the digital data processing system is in operation, the central processing unit operates by retrieving, or fetching, information from the memory, determining if the information is instructions or data, manipulating the fetched data in accordance with the instructions, and storing the results of the data manipulations in the memory.
Any program run on a digital data processing system is typically made up of a number of smaller entities, referred to as procedures, each of which is designed to accomplish a specific task and consists of a set of central processing unit executable instructions. Some procedures are based on higher-level instructions contained in user supplied source code. For example, a user-drafted instruction to add two numbers together may be translated into a central processing unit executable procedure that includes instructions to: retrieve the numbers from selected memory address locations; add the numbers together; and store the sum of numbers in a memory address location. Still other central processing unit executable procedures perform housekeeping functions for the digital data processing system. For example, some procedures load data instructions from an input-output device into memory locations and other procedures supply input-output devices with information stored in memory locations. The housekeeping procedures are typically part of an operating system which emptiness a set of processes designed to control execution of the application process by the digital data processing system.
Typically, a procedure running on the digital data processing system has the capability of invoking or calling another procedure for execution on the system. A call to another procedure may occur during the execution of a procedure in order to initiate the execution of another procedure that is part of the process being run. Further, a procedure being executed may call another procedure for execution if the calling procedure requires a particular subtask to be performed that the called procedure is designed to perform. Thus, the actual running of a process on a digital data processing system can be viewed as the selective, and sometimes repetitive, execution of a number of individual procedures by the system.
When a digital data processing system is in operation, events may occur that the procedure currently running on the system may not be designed to resolve. These events, referred to as exceptions, may be either internal or external to the process running on the system. Examples of external exceptions include the failure of input-output devices, or a system user entering a command to intentionally stop the running of the process. Internal exceptions occur as a result of the execution of a particular instruction that disrupts the execution of the procedure being executed. An example of an internal exception is an instruction in a procedure to divide a number by zero.
The operating systems of many data processing systems are provided with exception services which are processes designed to resolve exceptions that can occur during the operation of digital data processing systems. An exception service comprises a number of procedures, which respond to exceptions by invoking other procedures for execution, known as exception handlers, that are designed to resolve the exceptions. Depending on the particulars of the procedures being executed when an exception occurs, and the nature of the specific exception, the exception service may invoke an exception handler or set of exception handlers which: attempts to cure the exception; ignores the exception; "unwinds" the current process running on the system by returning to a suspended procedure, which either directly or indirectly called the interrupted procedure, where the exception can be resolved; or, may undertake a combination of these actions.
Problems arise in digital data processing systems when exceptions occur while one procedure is invoking another procedure for execution. In some digital data processing systems there is a period during the procedure invocation process wherein the exception service is unable to accurately establish whether an exception occurred during the running of the calling procedure or during the running of the called procedure. Consequently, the exception service may fail to invoke a correct exception handler. This can occur if the exception service either invokes an incorrect exception handler or invokes the correct exception handler with incorrect information. Moreover, if the exception service cannot promptly determine the specific procedure being executed when the exception occurred, the exception service may be unable to properly save data and instructions relating to the procedure being executed.